﻿using System;
using System.Linq;
using System.Collections.Generic;

namespace PFB_14
{
    class Program
    {
        static void Main(string[] args)
        {
            Store store = new Store();
            Random r = new Random();

            for (int i = 0; i < 100; i++)
            {
                Product p = new Product();

                p.Name = "Product " + i.ToString();
                p.Price = r.Next(1, 1000) / 10M;
                p.Count = r.Next(1, 10);

                store.Products.Add(p);
            }

            Console.WriteLine("Total Price of Store: " + store.TotalPrice);
            Console.WriteLine("Total Count of Product: " + store.Products.Count);

            Product ep = store.ExpensiveProduct;
            Console.WriteLine("Most Expensive Product: " 
                + ep.Name + " " + ep.Price);

            Console.ReadKey();

        }










        static void F1()
        {
            //int[] array = new int[5];
            //Person p = new Person();
            List<int> collection = new List<int>();

            int x = int.Parse(Console.ReadLine());

            while (x >= 0)
            {
                collection.Add(x);
                x = int.Parse(Console.ReadLine());
            }


            Console.WriteLine("Count: " + collection.Count);

            int sum = 0;

            for (int i = 0; i < collection.Count; i++)
            {
                sum += collection[i];
            }

            Console.WriteLine("Sum: " + sum);
        }
    }
}
